/**
 * fonfig 字段说明：
 * database 现在选用的数据库
 * databases 可能拓展的数据库
 * 配置文件的目的，减少硬编码，降低耦合度
 */
'use strict';
const Sequelize = require('sequelize');
const Op = Sequelize.Op;
const operatorsAliases = {
  $eq: Op.eq,
  $ne: Op.ne,
  $gte: Op.gte,
  $gt: Op.gt,
  $lte: Op.lte,
  $lt: Op.lt,
  $not: Op.not,
  $in: Op.in,
  $notIn: Op.notIn,
  $is: Op.is,
  $like: Op.like,
  $notLike: Op.notLike,
  $iLike: Op.iLike,
  $notILike: Op.notILike,
  $regexp: Op.regexp,
  $notRegexp: Op.notRegexp,
  $iRegexp: Op.iRegexp,
  $notIRegexp: Op.notIRegexp,
  $between: Op.between,
  $notBetween: Op.notBetween,
  $overlap: Op.overlap,
  $contains: Op.contains,
  $contained: Op.contained,
  $adjacent: Op.adjacent,
  $strictLeft: Op.strictLeft,
  $strictRight: Op.strictRight,
  $noExtendRight: Op.noExtendRight,
  $noExtendLeft: Op.noExtendLeft,
  $and: Op.and,
  $or: Op.or,
  $any: Op.any,
  $all: Op.all,
  $values: Op.values,
  $col: Op.col
};
const config = {
  database: 'mongodb',
  myconnect: 'mongodb://120.77.247.213:27017/lizhishuxcx',
  //myconnect: 'mongodb://root:qq86670286@dds-wz9a840b8f6ad4b41649-pub.mongodb.rds.aliyuncs.com:3717/admin',
  TOKEN_SECRET: 'jusezyg20171230',
  TOKEN: "hunanjusekeji",//token
  weixinAppID: "wx9e3e621dcc21345b",//公众号
  weixinSecret: "13a81fb35ddc74d1f9f4a73c75b8afa4",//公众号
  //微信小程序用户端请求数据接口
  openIDurl: "https://api.weixin.qq.com/sns/jscode2session?",
  appSecreturl: "https://api.weixin.qq.com/cgi-bin/token?",//获取小程序access_token
  getQcode: 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=',//获取小程序二维码
  getuserinfo: "https://api.weixin.qq.com/sns/userinfo?access_token=",
  pageAuthUrl: "https://api.weixin.qq.com/sns/oauth2/access_token?",
  getticket: "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=",
  HQcode: "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=",//获取公众号二维码
  xcxjusekj: { //小程序后台数据库
    host: '47.90.123.205',
    database: 'wx_red_calendar',
    username: 'wx_red_calendar',
    password: 'wx_red_calendar',
    dialect: 'mysql',
    port: 3306,
    logging: false
  },
  operatorsAliases,
  pool: {
    max: 100,
    min: 0,
    idle: 10000
  },
  //http重定向htpps
  LocationUrl: 'https://www.superbest.wang',
  COSURL: "https://xcximg.youdream.wang",
  COSCDN: "http://xcxjusekj-1253243042.cosgz.myqcloud.com",

};
module.exports = config;
